/**
 * MD5 密码加密
 */
import * as crypto from 'crypto';

export function md5(str: string) {
  /**
   * 盐值 混淆密码
   */
  const salt = 'hh' + str;
  const hash = crypto.createHash('md5');
  hash.update(salt);
  return hash.digest('hex');
}
